<div class="clinical-notes-section col-xs-12">
	<div class="new-btn pb-3">
		<button class="btn btn-sm small new-note-btn mr-1">
			<svg class="icon icon-sm">
				<use href="#icon-add"></use>
			</svg>
			{{ __("New Clinical Note") }}
		</button>
	</div>
	<div class="all-clinical-notes">
		{% if (clinical_notes.length) { %}
			{% for(var i=0, l=clinical_notes.length; i<l; i++) { %}
				<div class="comment-content p-3 row" name="{{ clinical_notes[i].name }}">
					<div class="mb-2 head col-xs-3">
						<div class="row">
							<div class="col-xs-2">
								{{ frappe.avatar(clinical_notes[i].user) }}
							</div>
							<div class="col-xs-10">
								<div class="mr-2 title font-weight-bold">
									{{ strip_html(clinical_notes[i].added_by) }}
								</div>
								<div class="time small text-muted">
									{{ frappe.datetime.global_date_format(clinical_notes[i].posting_date) }}<br>
									{{ clinical_notes[i].practitioner }}<br>
									<div class="note-type">
										{{ clinical_notes[i].clinical_note_type }}
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="content col-xs-8">
						{{ clinical_notes[i].note }}
					</div>
					<div class="col-xs-1 text-right">
						<span class="edit-note-btn btn btn-link">
							<svg class="icon icon-sm"><use xlink:href="#icon-edit"></use></svg>
						</span>
						<span class="delete-note-btn  btn btn-link pl-2">
							<svg class="icon icon-xs"><use xlink:href="#icon-delete"></use></svg>
						</span>
					</div>
				</div>
			{% } %}
		{% } else { %}
            <div class="no-clinical-notes text-muted pt-6">
                {{ __("No Clinical Notes") }}
            </div>
		    {% } %}
	</div>
</div>

<style>

.comment-content {
    border: 1px solid var(--border-color);
	border-bottom: none;
}

.comment-content:last-child {
    border-bottom: 1px solid var(--border-color);
}

.new-btn {
	text-align: right;
}

.clinical-notes-section .no-clinical-notes {
	min-height: 100px;
	text-align: center;
}

.clinical-notes-section .btn {
	padding: 0.2rem 0.2rem;
}

</style>